
ROOT_PATH=$(cd `dirname $0`; pwd)
MY_IP=$(ifconfig | grep inet | grep -v inet6 | grep -v -E "127.*"| grep -v -E "169.*"| cut -d ' ' -f2)

echo ROOT_PATH=${ROOT_PATH}
echo MY_IP=${MY_IP}

RUN_CMD="\
build/app/rtc-xswitch/rtc-xswitch \
-c ${ROOT_PATH}/log4cplus.properties \
--record-path /tmp/recorder/ \
--max-video-bitrate 1000 \
--min-video-bitrate 200 \
--compensate-rtcp \
--enable-fec --translate-fec \
--http-ip ${MY_IP} \
--http-port 3019 \
-m ${MY_IP} \
--http-external-ip ${MY_IP} \
--http-external-port 9999 \
--ipm-ip ${MY_IP} \
--proxy-addr=127.0.0.1:2021 \
"

echo RUN_CMD=${RUN_CMD}
${RUN_CMD}
